The overall goal of this project is to improve quality of care of patients with diabetes by identifying patients who may have particular difficulty reaching treatment targets and who could therefore potentially benefit from additional resources. Investigators propose to achieve this goal by developing a technology to accurately identify patients at high risk for not reaching blood glucose target to enable cost-effective implementation of resource-intensive interventions that improve glycemic control in high-risk individuals. Improving blood glucose control in patients with diabetes could both improve their quality of life by reducing diabetes complications and decrease costs. Some patients that face particularly high barriers to glucose control may benefit from additional resources that are too expensive to apply to broad patient populations. However, it is not currently possible to identify patients at high risk not being able to reach blood glucose targets with sufficient accuracy to make these interventions cost-effective. One reason for this is that a large fraction of critical information about the patients' functional status, social circumstances and other important factors that may present barriers to glucose control is only found in narrative documents, from which it is difficult to extract. Furthermore, the amount of information about any single patient i the medical record is enormous, and is impossible to process efficiently using standard analytical algorithms such as regression analysis. In the proposed project investigators will combine two novel technologies - natural language processing of electronic provider notes and artificial intelligence technology Dynamic Logic - to help circumvent these challenges to build a high-accuracy model of risk of not being able to reach blood glucose targets in patients with diabetes. Natural language processing will identify key concepts documented in the provider notes and will help translate their text into a compendium of facts about the patient. Dynamic Logic makes use of a limited number of iterative approximations to reduce the complexity of a problem with multiple predictor variables from exponential to approximately linear. Utilization of Dynamic Logic will therefore allow to greatly increasing the number of factors / variables that can be considered for the models for prediction of failure to reach glucose control, and ultimately improve their accuracy. Consequently this translational multidisciplinary project will both advance our understanding of the risk factors for not being able to reach glucose control for patients with diabetes and assist in real-life implementation of interventions that can help lower their blood glucose, decrease the rate of diabetes complications, improve the patients' quality of life and help control the rising costs of healthcare.